package com.example.activitysign.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.activitysign.entity.ActivityAwardRule;
import com.example.activitysign.validate.ActivityAwardRuleSearchValidate;
import com.example.activitysign.vo.activity.ActivityAwardRuleListedVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * 奖励规则Mapper
 *
 * @author fei
 */
@Mapper
public interface ActivityAwardRuleMapper extends BaseMapper<ActivityAwardRule> {

    IPage<ActivityAwardRuleListedVo> list(Page<ActivityAwardRule> page, @Param("param") ActivityAwardRuleSearchValidate activityAwardRuleSearchValidate);

    @Update("update la_activity_award_rule set is_delete=1  where activity_award_id=#{awardId}")
    void deleteByAwardId(@Param("awardId") Long awardId);
}
